<local:MetroStylesBase x:Class="Xceed.Silverlight.ListBox.Themes.MetroDarkTheme.MetroDarkThemeExplicitStyles"
                       x:ClassModifier="Internal"
                       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                       xmlns:s="clr-namespace:System;assembly=mscorlib"
                       xmlns:sllb="http://schemas.xceed.com/silverlight/xaml/listbox"
                       xmlns:local="clr-namespace:Xceed.Silverlight.ListBox.Themes">

   <!-- The MetroAccentColorBrush is dynamically injected in this resource dictionary
         merged dictionaries at runtime.
    -->

   <!-- =================================================================== -->
   <!-- Resources specific to this Theme/ColorScheme                        -->
   <!-- =================================================================== -->

   <SolidColorBrush x:Key="MetroDarkThemeLoadingSpinnerShadowBackgroundBrush"
                    Color="#3FFFFFFF" />

   <!-- COPIED FROM GENERIC, NEED TO CHECK -->

   <Style x:Key="MetroDarkThemeLicensingStateRichTextBoxStyle"
          TargetType="RichTextBox">
      <Setter Property="HorizontalAlignment"
              Value="Left" />
      <Setter Property="TextWrapping"
              Value="Wrap" />
      <Setter Property="FontSize"
              Value="13.333" />
      <Setter Property="Foreground"
              Value="White" />
      <Setter Property="VerticalAlignment"
              Value="Top" />
      <Setter Property="IsReadOnly"
              Value="True" />
      <Setter Property="IsTabStop"
              Value="False" />
      <Setter Property="CaretBrush"
              Value="Transparent" />

      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="RichTextBox">
               <Border x:Name="ContentElement"
                       Background="Transparent"
                       BorderBrush="Transparent"
                       BorderThickness="0" />
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- END COPY -->

   <SolidColorBrush x:Key="MetroDarkThemeGroupNavigationControlButtonDefaultBackgroundBrush"
                    Color="#212021" />

   <sllb:DividendDivisorToCeilingQuotientConverter x:Key="MetroDarkThemeDividendDivisorToCeilingQuotientConverter" />

   <DataTemplate x:Key="MetroDarkThemeDataNavigationIconTemplate">
      <Path Fill="White">
         <Path.Data>
            <PathGeometry>
               <PathFigureCollection>
                  <PathFigure StartPoint="0,0"
                              IsClosed="True">
                     <LineSegment Point="5,0" />
                     <LineSegment Point="5,5" />
                     <LineSegment Point="0,5" />
                  </PathFigure>

                  <PathFigure StartPoint="6,0"
                              IsClosed="True">
                     <LineSegment Point="11,0" />
                     <LineSegment Point="11,5" />
                     <LineSegment Point="6,5" />
                  </PathFigure>

                  <PathFigure StartPoint="12,0"
                              IsClosed="True">
                     <LineSegment Point="17,0" />
                     <LineSegment Point="17,5" />
                     <LineSegment Point="12,5" />
                  </PathFigure>

                  <PathFigure StartPoint="0,6"
                              IsClosed="True">
                     <LineSegment Point="5,6" />
                     <LineSegment Point="5,11" />
                     <LineSegment Point="0,11" />
                  </PathFigure>

                  <PathFigure StartPoint="6,6"
                              IsClosed="True">
                     <LineSegment Point="11,6" />
                     <LineSegment Point="11,11" />
                     <LineSegment Point="6,11" />
                  </PathFigure>

                  <PathFigure StartPoint="0,12"
                              IsClosed="True">
                     <LineSegment Point="5,12" />
                     <LineSegment Point="5,17" />
                     <LineSegment Point="0,17" />
                  </PathFigure>

                  <PathFigure StartPoint="6,12"
                              IsClosed="True">
                     <LineSegment Point="11,12" />
                     <LineSegment Point="11,17" />
                     <LineSegment Point="6,17" />
                  </PathFigure>

                  <PathFigure StartPoint="12,12"
                              IsClosed="True">
                     <LineSegment Point="17,12" />
                     <LineSegment Point="17,17" />
                     <LineSegment Point="12,17" />
                  </PathFigure>
               </PathFigureCollection>
            </PathGeometry>
         </Path.Data>
      </Path>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeDataNavigationMouseOverIconTemplate">
      <Path Fill="{StaticResource MetroAccentColorBrush}">
         <Path.Data>
            <PathGeometry>
               <PathFigureCollection>
                  <PathFigure StartPoint="0,0"
                              IsClosed="True">
                     <LineSegment Point="5,0" />
                     <LineSegment Point="5,5" />
                     <LineSegment Point="0,5" />
                  </PathFigure>

                  <PathFigure StartPoint="6,0"
                              IsClosed="True">
                     <LineSegment Point="11,0" />
                     <LineSegment Point="11,5" />
                     <LineSegment Point="6,5" />
                  </PathFigure>

                  <PathFigure StartPoint="12,0"
                              IsClosed="True">
                     <LineSegment Point="17,0" />
                     <LineSegment Point="17,5" />
                     <LineSegment Point="12,5" />
                  </PathFigure>

                  <PathFigure StartPoint="0,6"
                              IsClosed="True">
                     <LineSegment Point="5,6" />
                     <LineSegment Point="5,11" />
                     <LineSegment Point="0,11" />
                  </PathFigure>

                  <PathFigure StartPoint="6,6"
                              IsClosed="True">
                     <LineSegment Point="11,6" />
                     <LineSegment Point="11,11" />
                     <LineSegment Point="6,11" />
                  </PathFigure>

                  <PathFigure StartPoint="0,12"
                              IsClosed="True">
                     <LineSegment Point="5,12" />
                     <LineSegment Point="5,17" />
                     <LineSegment Point="0,17" />
                  </PathFigure>

                  <PathFigure StartPoint="6,12"
                              IsClosed="True">
                     <LineSegment Point="11,12" />
                     <LineSegment Point="11,17" />
                     <LineSegment Point="6,17" />
                  </PathFigure>

                  <PathFigure StartPoint="12,12"
                              IsClosed="True">
                     <LineSegment Point="17,12" />
                     <LineSegment Point="17,17" />
                     <LineSegment Point="12,17" />
                  </PathFigure>
               </PathFigureCollection>
            </PathGeometry>
         </Path.Data>
      </Path>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeUpArrowIconTemplate">
      <Grid Height="28"
            Width="28">
         <Path Data="M 23.82,10.65 L23.82,16.86 17.09,10.65 17.09,26.70 11.91,26.70 11.91,10.14 5.18,16.86 5.18,10.14 14.5,0.30 23.82,10.65 z"
               Fill="White" />
      </Grid>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeUpArrowMouseOverIconTemplate">
      <Grid Height="28"
            Width="28">
         <Path Data="M 23.82,10.65 L23.82,16.86 17.09,10.65 17.09,26.70 11.91,26.70 11.91,10.14 5.18,16.86 5.18,10.14 14.5,0.30 23.82,10.65 z"
               Fill="{StaticResource MetroAccentColorBrush}" />
      </Grid>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeDownArrowIconTemplate">
      <Grid Height="28"
            Width="28">
         <Path Data="M 5.18,17.35 L5.18,11.14 11.91,17.35 11.91,1.30 17.09,1.30 17.09,17.86 23.82,11.14 23.82,17.86 14.5,27.70 5.18,17.35 z"
               Fill="White" />
      </Grid>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeDownArrowMouseOverIconTemplate">
      <Grid Height="28"
            Width="28">
         <Path Data="M 5.18,17.35 L5.18,11.14 11.91,17.35 11.91,1.30 17.09,1.30 17.09,17.86 23.82,11.14 23.82,17.86 14.5,27.70 5.18,17.35 z"
               Fill="{StaticResource MetroAccentColorBrush}" />
      </Grid>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeRightArrowIconTemplate">
      <Grid Height="28"
            Width="28">
         <Path Data="M 17.42,23 L11.07,23 17.42,16.14 1.02,16.14 1.02,10.86 17.95,10.86 11.07,4 17.95,4 28.00,13.5 17.42,23 z"
               Fill="White" />
      </Grid>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeRightArrowMouseOverIconTemplate">
      <Grid Height="28"
            Width="28">
         <Path Data="M 17.42,23 L11.07,23 17.42,16.14 1.02,16.14 1.02,10.86 17.95,10.86 11.07,4 17.95,4 28.00,13.5 17.42,23 z"
               Fill="{StaticResource MetroAccentColorBrush}" />
      </Grid>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeLeftArrowIconTemplate">
      <Grid Height="28"
            Width="28">
         <Path Data="M 10.58,4 L16.93,4 10.58,10.86 26.98,10.86 26.98,16.14 10.05,16.14 16.93,23 10.05,23 0,13.5 10.58,4 z"
               Fill="White" />
      </Grid>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeLeftArrowMouseOverIconTemplate">
      <Grid Height="28"
            Width="28">
         <Path Data="M 10.58,4 L16.93,4 10.58,10.86 26.98,10.86 26.98,16.14 10.05,16.14 16.93,23 10.05,23 0,13.5 10.58,4 z"
               Fill="{StaticResource MetroAccentColorBrush}" />
      </Grid>
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeCloseIconTemplate">
      <Path Height="14"
            Width="14"
            Stretch="Fill"
            Data="M 603.43,345.45 L605.55,347.57 610.5,342.62 615.45,347.57 617.57,345.45 612.62,340.5 617.57,335.55 615.45,333.43 610.5,338.38 605.55,333.43 603.43,335.55 608.38,340.5 603.43,345.45 z"
            Fill="White" />
   </DataTemplate>

   <DataTemplate x:Key="MetroDarkThemeCloseMouseOverIconTemplate">
      <Path Height="14"
            Width="14"
            Stretch="Fill"
            Data="M 603.43,345.45 L605.55,347.57 610.5,342.62 615.45,347.57 617.57,345.45 612.62,340.5 617.57,335.55 615.45,333.43 610.5,338.38 605.55,333.43 603.43,335.55 608.38,340.5 603.43,345.45 z"
            Fill="{StaticResource MetroAccentColorBrush}" />
   </DataTemplate>

   <Style x:Key="MetroDarkThemeButtonStyle"
          TargetType="Button">
      <Setter Property="Cursor"
              Value="Hand" />

      <Setter Property="local:MetroThemeHelper.MetroIconTemplate">
         <Setter.Value>
            <DataTemplate />
         </Setter.Value>
      </Setter>

      <Setter Property="local:MetroThemeHelper.MetroMouseOverIconTemplate">
         <Setter.Value>
            <DataTemplate />
         </Setter.Value>
      </Setter>

      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="Button">
               <Grid x:Name="RootElement">
                  <Grid.RenderTransform>
                     <CompositeTransform x:Name="rootElementCompositeTransform" />
                  </Grid.RenderTransform>

                  <VisualStateManager.VisualStateGroups>
                     <VisualStateGroup x:Name="CommonStates">
                        <VisualStateGroup.Transitions>
                           <VisualTransition GeneratedDuration="0:0:0.1" />
                        </VisualStateGroup.Transitions>
                        <VisualState x:Name="Normal" />

                        <VisualState x:Name="MouseOver">
                           <Storyboard>
                              <DoubleAnimation Storyboard.TargetName="icon"
                                               Storyboard.TargetProperty="Opacity"
                                               Duration="00:00:00.000"
                                               To="0" />

                              <DoubleAnimation Storyboard.TargetName="mouseOverIcon"
                                               Storyboard.TargetProperty="Opacity"
                                               Duration="00:00:00.000"
                                               To="1" />

                              <ColorAnimation Storyboard.TargetName="ellipse"
                                              Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)"
                                              Duration="00:00:00.000"
                                              To="White" />
                           </Storyboard>
                        </VisualState>

                        <VisualState x:Name="Pressed">
                           <Storyboard>
                              <DoubleAnimation Storyboard.TargetName="icon"
                                               Storyboard.TargetProperty="Opacity"
                                               Duration="00:00:00.000"
                                               To="0" />

                              <DoubleAnimation Storyboard.TargetName="mouseOverIcon"
                                               Storyboard.TargetProperty="Opacity"
                                               Duration="00:00:00.000"
                                               To="1" />

                              <ColorAnimation Storyboard.TargetName="ellipse"
                                              Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)"
                                              Duration="00:00:00.000"
                                              To="White" />

                              <DoubleAnimation Storyboard.TargetName="rootElementCompositeTransform"
                                               Storyboard.TargetProperty="TranslateY"
                                               Duration="00:00:00.000"
                                               To="-3" />
                           </Storyboard>
                        </VisualState>

                        <VisualState x:Name="Disabled">
                           <Storyboard>
                              <DoubleAnimation Storyboard.TargetName="RootElement"
                                               Storyboard.TargetProperty="Opacity"
                                               Duration="00:00:00.000"
                                               To="0.5" />
                           </Storyboard>
                        </VisualState>
                     </VisualStateGroup>
                  </VisualStateManager.VisualStateGroups>

                  <Ellipse x:Name="ellipse"
                           Stroke="White"
                           StrokeThickness="2"
                           Fill="Transparent" />

                  <ContentControl x:Name="icon"
                                  Margin="{TemplateBinding Padding}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  ContentTemplate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:MetroThemeHelper.MetroIconTemplate)}" />

                  <ContentControl x:Name="mouseOverIcon"
                                  Margin="{TemplateBinding Padding}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  ContentTemplate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:MetroThemeHelper.MetroMouseOverIconTemplate)}"
                                  Opacity="0" />

                  <ContentPresenter x:Name="contentPresenter"
                                    Margin="{TemplateBinding Padding}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    Content="{TemplateBinding Content}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center" />
               </Grid>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!--**************************
    * STYLE: ScrollViewer
    ************************** -->
   <Style TargetType="ScrollViewer"
          x:Key="MetroDarkThemeScrollViewerStyle">

      <Setter Property="HorizontalContentAlignment"
              Value="Left" />

      <Setter Property="VerticalContentAlignment"
              Value="Top" />

      <Setter Property="VerticalScrollBarVisibility"
              Value="Visible" />

      <Setter Property="BorderBrush"
              Value="Transparent" />

      <Setter Property="BorderThickness"
              Value="0" />

      <Setter Property="Background"
              Value="Transparent" />

      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="ScrollViewer">
               <Border CornerRadius="2"
                       BorderBrush="{TemplateBinding BorderBrush}"
                       BorderThickness="{TemplateBinding BorderThickness}">
                  <Border.Resources>
                     <Style TargetType="ScrollBar">
                        <Setter Property="MinWidth"
                                Value="17" />

                        <Setter Property="MinHeight"
                                Value="17" />

                        <Setter Property="IsTabStop"
                                Value="False" />

                        <Setter Property="Template">
                           <Setter.Value>
                              <ControlTemplate TargetType="ScrollBar">
                                 <Grid x:Name="Root">
                                    <Grid.Resources>
                                       <ControlTemplate x:Key="MetroDarkThemeRepeatButtonTemplate"
                                                        TargetType="RepeatButton">
                                          <Grid x:Name="Root"
                                                Background="Transparent">
                                             <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                   <VisualState x:Name="Normal" />
                                                </VisualStateGroup>
                                             </VisualStateManager.VisualStateGroups>
                                          </Grid>
                                       </ControlTemplate>

                                       <ControlTemplate x:Key="MetroDarkThemeHorizontalIncrementTemplate"
                                                        TargetType="RepeatButton">
                                          <Grid x:Name="Root">
                                             <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                   <VisualState x:Name="Normal">
                                                      <Storyboard>
                                                         <DoubleAnimation Duration="00:00:00.000"
                                                                          To="1"
                                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                          Storyboard.TargetName="border" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="MouseOver">
                                                      <Storyboard>
                                                         <ColorAnimation Duration="00:00:00.000"
                                                                         To="#FF888888"
                                                                         Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                         Storyboard.TargetName="path" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Pressed">
                                                      <Storyboard>
                                                         <ColorAnimation Duration="00:00:00.000"
                                                                         To="#FF888888"
                                                                         Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                         Storyboard.TargetName="path" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Disabled" />
                                                </VisualStateGroup>
                                             </VisualStateManager.VisualStateGroups>

                                             <Border x:Name="border"
                                                     Background="#00000000" />

                                             <Path x:Name="path"
                                                   Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z "
                                                   Height="8"
                                                   Stretch="Uniform"
                                                   Width="4">
                                                <Path.Fill>
                                                   <SolidColorBrush x:Name="ButtonColor"
                                                                    Color="#FF666666" />
                                                </Path.Fill>
                                             </Path>
                                          </Grid>
                                       </ControlTemplate>

                                       <ControlTemplate x:Key="MetroDarkThemeHorizontalDecrementTemplate"
                                                        TargetType="RepeatButton">
                                          <Grid x:Name="Root">
                                             <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                   <VisualState x:Name="Normal" />

                                                   <VisualState x:Name="MouseOver">
                                                      <Storyboard>
                                                         <ColorAnimation Duration="00:00:00.000"
                                                                         To="#FF888888"
                                                                         Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                         Storyboard.TargetName="path" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Pressed">
                                                      <Storyboard>
                                                         <ColorAnimation Duration="00:00:00.000"
                                                                         To="#FF888888"
                                                                         Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                         Storyboard.TargetName="path" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Disabled" />
                                                </VisualStateGroup>
                                             </VisualStateManager.VisualStateGroups>

                                             <Rectangle x:Name="Background"
                                                        Fill="Transparent" />

                                             <Path x:Name="path"
                                                   Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z "
                                                   Height="8"
                                                   Stretch="Uniform"
                                                   Width="4">
                                                <Path.Fill>
                                                   <SolidColorBrush x:Name="ButtonColor"
                                                                    Color="#FF666666" />
                                                </Path.Fill>
                                             </Path>
                                          </Grid>
                                       </ControlTemplate>

                                       <ControlTemplate x:Key="MetroDarkThemeVerticalIncrementTemplate"
                                                        TargetType="RepeatButton">
                                          <Grid x:Name="Root">
                                             <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                   <VisualStateGroup.Transitions>
                                                      <VisualTransition GeneratedDuration="00:00:00.200" />
                                                   </VisualStateGroup.Transitions>

                                                   <VisualState x:Name="Normal" />

                                                   <VisualState x:Name="MouseOver">
                                                      <Storyboard>
                                                         <ColorAnimation Duration="00:00:00.000"
                                                                         To="#FF888888"
                                                                         Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                         Storyboard.TargetName="path" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Pressed">
                                                      <Storyboard>
                                                         <ColorAnimation Duration="00:00:00.000"
                                                                         To="#FF888888"
                                                                         Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                         Storyboard.TargetName="path" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Disabled">
                                                      <Storyboard>
                                                         <DoubleAnimation Duration="00:00:00.000"
                                                                          To="0.5"
                                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                          Storyboard.TargetName="Root" />
                                                      </Storyboard>
                                                   </VisualState>
                                                </VisualStateGroup>
                                             </VisualStateManager.VisualStateGroups>

                                             <Rectangle x:Name="Background"
                                                        Fill="Transparent" />

                                             <Path x:Name="path"
                                                   Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z "
                                                   Height="4"
                                                   Stretch="Uniform"
                                                   Width="8">
                                                <Path.Fill>
                                                   <SolidColorBrush x:Name="ButtonColor"
                                                                    Color="#FF666666" />
                                                </Path.Fill>
                                             </Path>
                                          </Grid>
                                       </ControlTemplate>

                                       <ControlTemplate x:Key="MetroDarkThemeVerticalDecrementTemplate"
                                                        TargetType="RepeatButton">
                                          <Grid x:Name="Root">
                                             <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                   <VisualState x:Name="Normal" />

                                                   <VisualState x:Name="MouseOver">
                                                      <Storyboard>
                                                         <ColorAnimation Duration="00:00:00.000"
                                                                         To="#FF888888"
                                                                         Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                         Storyboard.TargetName="path" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Pressed">
                                                      <Storyboard>
                                                         <ColorAnimation Duration="00:00:00.000"
                                                                         To="#FF888888"
                                                                         Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                         Storyboard.TargetName="path" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Disabled">
                                                      <Storyboard>
                                                         <DoubleAnimation Duration="00:00:00.000"
                                                                          To="0.5"
                                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                          Storyboard.TargetName="Root" />
                                                      </Storyboard>
                                                   </VisualState>
                                                </VisualStateGroup>
                                             </VisualStateManager.VisualStateGroups>

                                             <Rectangle x:Name="Background"
                                                        Fill="Transparent" />

                                             <Path x:Name="path"
                                                   Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z "
                                                   Height="4"
                                                   Stretch="Uniform"
                                                   Width="8">
                                                <Path.Fill>
                                                   <SolidColorBrush x:Name="ButtonColor"
                                                                    Color="#FF666666" />
                                                </Path.Fill>
                                             </Path>
                                          </Grid>
                                       </ControlTemplate>

                                       <ControlTemplate x:Key="MetroDarkThemeVerticalThumbTemplate"
                                                        TargetType="Thumb">
                                          <Grid>
                                             <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                   <VisualStateGroup.Transitions>
                                                      <VisualTransition GeneratedDuration="00:00:00.200" />
                                                   </VisualStateGroup.Transitions>

                                                   <VisualState x:Name="Normal" />

                                                   <VisualState x:Name="MouseOver">
                                                      <Storyboard>
                                                         <DoubleAnimation Duration="00:00:00.000"
                                                                          To="1"
                                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                          Storyboard.TargetName="mouseOver" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Pressed">
                                                      <Storyboard>
                                                         <DoubleAnimation Duration="00:00:00.000"
                                                                          To="1"
                                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                          Storyboard.TargetName="mouseOver" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Disabled">
                                                      <Storyboard>
                                                         <DoubleAnimation Duration="00:00:00.000"
                                                                          To="0.5"
                                                                          Storyboard.TargetProperty="Opacity"
                                                                          Storyboard.TargetName="ThumbVisual" />

                                                         <ColorAnimation Duration="00:00:00.000"
                                                                         To="#FF888888"
                                                                         Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                         Storyboard.TargetName="mouseOver" />
                                                      </Storyboard>
                                                   </VisualState>
                                                </VisualStateGroup>
                                             </VisualStateManager.VisualStateGroups>

                                             <Grid x:Name="ThumbVisual"
                                                   Margin="1,0,1,0">
                                                <Rectangle x:Name="Background"
                                                           StrokeThickness="0"
                                                           Fill="#FF666666" />

                                                <Rectangle x:Name="mouseOver"
                                                           StrokeThickness="0"
                                                           Fill="#FF888888"
                                                           Opacity="0" />
                                             </Grid>
                                          </Grid>
                                       </ControlTemplate>

                                       <ControlTemplate x:Key="MetroDarkThemeHorizontalThumbTemplate"
                                                        TargetType="Thumb">
                                          <Grid>
                                             <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                   <VisualStateGroup.Transitions>
                                                      <VisualTransition GeneratedDuration="00:00:00.200" />
                                                   </VisualStateGroup.Transitions>

                                                   <VisualState x:Name="Normal" />

                                                   <VisualState x:Name="MouseOver">
                                                      <Storyboard>
                                                         <DoubleAnimation Duration="00:00:00.000"
                                                                          To="1"
                                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                          Storyboard.TargetName="border" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Pressed">
                                                      <Storyboard>
                                                         <DoubleAnimation Duration="00:00:00.000"
                                                                          To="1"
                                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                          Storyboard.TargetName="border" />
                                                      </Storyboard>
                                                   </VisualState>

                                                   <VisualState x:Name="Disabled">
                                                      <Storyboard>
                                                         <DoubleAnimation Duration="00:00:00.000"
                                                                          To="0"
                                                                          Storyboard.TargetProperty="Opacity"
                                                                          Storyboard.TargetName="ThumbVisual" />
                                                      </Storyboard>
                                                   </VisualState>
                                                </VisualStateGroup>
                                             </VisualStateManager.VisualStateGroups>

                                             <Grid x:Name="ThumbVisual"
                                                   Margin="0,1,0,1">
                                                <Rectangle x:Name="Background"
                                                           Fill="#FF666666" />

                                                <Border x:Name="border"
                                                        Background="#FF888888"
                                                        Opacity="0" />
                                             </Grid>
                                          </Grid>
                                       </ControlTemplate>
                                    </Grid.Resources>

                                    <VisualStateManager.VisualStateGroups>
                                       <VisualStateGroup x:Name="CommonStates">
                                          <VisualState x:Name="Normal" />

                                          <VisualState x:Name="MouseOver" />

                                          <VisualState x:Name="Disabled">
                                             <Storyboard>
                                                <DoubleAnimation Duration="00:00:00.000"
                                                                 To="0.5"
                                                                 Storyboard.TargetProperty="Opacity"
                                                                 Storyboard.TargetName="Root" />
                                             </Storyboard>
                                          </VisualState>
                                       </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>

                                    <Grid x:Name="HorizontalRoot">
                                       <Grid.ColumnDefinitions>
                                          <ColumnDefinition Width="Auto" />

                                          <ColumnDefinition Width="Auto" />

                                          <ColumnDefinition Width="Auto" />

                                          <ColumnDefinition Width="*" />

                                          <ColumnDefinition Width="Auto" />
                                       </Grid.ColumnDefinitions>

                                       <RepeatButton x:Name="HorizontalSmallDecrease"
                                                     Grid.Column="0"
                                                     IsTabStop="False"
                                                     Interval="50"
                                                     Margin="1"
                                                     Template="{StaticResource MetroDarkThemeHorizontalDecrementTemplate}"
                                                     Width="16" />

                                       <RepeatButton x:Name="HorizontalLargeDecrease"
                                                     Grid.Column="1"
                                                     IsTabStop="False"
                                                     Interval="50"
                                                     Template="{StaticResource MetroDarkThemeRepeatButtonTemplate}"
                                                     Width="0" />

                                       <Thumb x:Name="HorizontalThumb"
                                              Grid.Column="2"
                                              MinWidth="18"
                                              Template="{StaticResource MetroDarkThemeHorizontalThumbTemplate}"
                                              Height="9"
                                              BorderThickness="0"
                                              BorderBrush="{x:Null}"
                                              Foreground="{x:Null}"
                                              Background="{x:Null}" />

                                       <RepeatButton x:Name="HorizontalLargeIncrease"
                                                     Grid.Column="3"
                                                     IsTabStop="False"
                                                     Interval="50"
                                                     Template="{StaticResource MetroDarkThemeRepeatButtonTemplate}" />

                                       <RepeatButton x:Name="HorizontalSmallIncrease"
                                                     Grid.Column="4"
                                                     IsTabStop="False"
                                                     Interval="50"
                                                     Margin="1"
                                                     Template="{StaticResource MetroDarkThemeHorizontalIncrementTemplate}"
                                                     Width="16" />
                                    </Grid>

                                    <Grid x:Name="VerticalRoot"
                                          Visibility="Collapsed">
                                       <Grid.RowDefinitions>
                                          <RowDefinition Height="Auto" />

                                          <RowDefinition Height="Auto" />

                                          <RowDefinition Height="Auto" />

                                          <RowDefinition Height="*" />

                                          <RowDefinition Height="Auto" />
                                       </Grid.RowDefinitions>

                                       <RepeatButton x:Name="VerticalSmallDecrease"
                                                     Height="16"
                                                     IsTabStop="False"
                                                     Interval="50"
                                                     Margin="1"
                                                     Grid.Row="0"
                                                     Template="{StaticResource MetroDarkThemeVerticalDecrementTemplate}" />

                                       <RepeatButton x:Name="VerticalLargeDecrease"
                                                     Height="0"
                                                     IsTabStop="False"
                                                     Interval="50"
                                                     Grid.Row="1"
                                                     Template="{StaticResource MetroDarkThemeRepeatButtonTemplate}" />

                                       <Thumb x:Name="VerticalThumb"
                                              MinHeight="18"
                                              Grid.Row="2"
                                              Template="{StaticResource MetroDarkThemeVerticalThumbTemplate}"
                                              Width="9"
                                              BorderThickness="0"
                                              BorderBrush="{x:Null}"
                                              Foreground="{x:Null}"
                                              Background="{x:Null}" />

                                       <RepeatButton x:Name="VerticalLargeIncrease"
                                                     IsTabStop="False"
                                                     Interval="50"
                                                     Grid.Row="3"
                                                     Template="{StaticResource MetroDarkThemeRepeatButtonTemplate}" />

                                       <RepeatButton x:Name="VerticalSmallIncrease"
                                                     Height="16"
                                                     IsTabStop="False"
                                                     Interval="50"
                                                     Margin="1"
                                                     Grid.Row="4"
                                                     Template="{StaticResource MetroDarkThemeVerticalIncrementTemplate}" />
                                    </Grid>
                                 </Grid>
                              </ControlTemplate>
                           </Setter.Value>
                        </Setter>
                     </Style>
                  </Border.Resources>

                  <Grid Background="{TemplateBinding Background}">
                     <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                     </Grid.RowDefinitions>
                     <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                     </Grid.ColumnDefinitions>

                     <ScrollContentPresenter x:Name="ScrollContentPresenter"
                                             Cursor="{TemplateBinding Cursor}"
                                             ContentTemplate="{TemplateBinding ContentTemplate}" />

                     <ScrollBar x:Name="VerticalScrollBar"
                                Width="18"
                                IsTabStop="False"
                                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                Grid.Column="1"
                                Grid.Row="0"
                                Orientation="Vertical"
                                ViewportSize="{TemplateBinding ViewportHeight}"
                                Maximum="{TemplateBinding ScrollableHeight}"
                                Minimum="0"
                                Value="{TemplateBinding VerticalOffset}"
                                Margin="0,-1,-1,-1" />

                     <ScrollBar x:Name="HorizontalScrollBar"
                                Height="18"
                                IsTabStop="False"
                                Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                Grid.Column="0"
                                Grid.Row="1"
                                Orientation="Horizontal"
                                ViewportSize="{TemplateBinding ViewportWidth}"
                                Maximum="{TemplateBinding ScrollableWidth}"
                                Minimum="0"
                                Value="{TemplateBinding HorizontalOffset}"
                                Margin="-1,0,-1,-1" />

                  </Grid>
               </Border>
            </ControlTemplate>

         </Setter.Value>
      </Setter>
   </Style>

   <!--**************************
    * TEMPLATE: ListBox
    ************************** -->
   <ControlTemplate x:Key="MetroDarkThemeListBoxTemplate"
                    TargetType="sllb:ListBox">
      <Border BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              Background="{TemplateBinding Background}">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />
               <VisualState x:Name="Disabled" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="ResquestStatus">

               <VisualState x:Name="NoPendingRequests" />

               <VisualState x:Name="RequestsPending">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="loadingIndicator"
                                                    Storyboard.TargetProperty="RequestsPending">
                        <DiscreteObjectKeyFrame KeyTime="00:00:00.0">
                           <DiscreteObjectKeyFrame.Value>
                              <s:Boolean>
                                 True
                              </s:Boolean>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>

               <VisualStateGroup.Transitions>
                  <VisualTransition From="RequestsPending"
                                    To="NoPendingRequests">
                     <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="loadingIndicator"
                                                       Storyboard.TargetProperty="RequestsPending">
                           <DiscreteObjectKeyFrame KeyTime="00:00:00.0">
                              <DiscreteObjectKeyFrame.Value>
                                 <s:Boolean>
                                    False
                                 </s:Boolean>
                              </DiscreteObjectKeyFrame.Value>
                           </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                     </Storyboard>
                  </VisualTransition>
               </VisualStateGroup.Transitions>
            </VisualStateGroup>

            <VisualStateGroup x:Name="LicensingStates">
               <VisualState x:Name="Licensed" />

               <VisualState x:Name="NotLicensed">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="licensingMessage"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

                <VisualStateGroup x:Name="DataNavigationPaneStates" >
                    <VisualState x:Name="DataNavigationPaneHidden">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="DataNavPane"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0"
                                             Duration="00:00:00.150"/>

                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DataNavPane"
                                                    Storyboard.TargetProperty="Visibility" 
                                                    Duration="00:00:0.0">
                                <DiscreteObjectKeyFrame KeyTime="00:00:0.150" >
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>


                    <VisualState x:Name="DataNavigationPaneVisible" >
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="DataNavPane"
                                             Storyboard.TargetProperty="Opacity"           
                                             From="0"
                                             To="1"
                                             Duration="00:00:00.150"/>

                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DataNavPane"
                                                    Storyboard.TargetProperty="Visibility" 
                                                    Duration="00:00:0.0">
                                <DiscreteObjectKeyFrame KeyTime="00:00:0.0" >
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>

         </VisualStateManager.VisualStateGroups>

         <Grid>
            <Grid.ColumnDefinitions>
               <ColumnDefinition />
               <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
               <RowDefinition Height="Auto" />
               <RowDefinition />
            </Grid.RowDefinitions>
            <Grid Grid.Column="0"
                  Grid.ColumnSpan="2"
                  Grid.Row="0"
                  Height="50"
                  Background="Black"
                  Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ToolPaneVisibility}">
               <sllb:FilterControl x:Name="FilterControl"
                                   HorizontalAlignment="Left"
                                   Margin="10,0,0,0"
                                   Height="28"
                                   Width="225"
                                   DataSourceFilterExpression="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FilterExpression, Mode=TwoWay}"
                                   sllb:SearchTextBox.FilteredFieldNames="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:SearchTextBox.FilteredFieldNames)}" 
                                   sllb:SearchTextBox.TooComplexText="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:SearchTextBox.TooComplexText)}"/>
               <Rectangle Height="1"
                          VerticalAlignment="Bottom"
                          Fill="#FF666666" />
            </Grid>
            <ScrollViewer x:Name="ScrollViewer"
                          IsTabStop="False"
                          TabNavigation="Once"
                          Grid.Column="0"
                          Grid.Row="1"
                          HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}"
                          VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
                          Padding="{TemplateBinding Padding}"
                          Style="{StaticResource MetroDarkThemeScrollViewerStyle}">
               <sllb:ItemsPresenter Margin="0,0,2,0" />
            </ScrollViewer>

            <sllb:LoadingIndicator x:Name="loadingIndicator"
                                   Grid.Column="0"
                                   Grid.Row="1" />

            <Grid x:Name="licensingMessage"
                  Grid.RowSpan="3"
                  Grid.ColumnSpan="2"
                  Visibility="Collapsed"
                  Background="#80000000">
               <Grid HorizontalAlignment="Center"
                     VerticalAlignment="Center"
                     Width="250">
                  <Grid.RowDefinitions>
                     <RowDefinition Height="0.27*" />
                     <RowDefinition Height="1" />
                     <RowDefinition Height="0.69*" />
                  </Grid.RowDefinitions>
                  <Border CornerRadius="6"
                          Grid.RowSpan="3">
                     <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1"
                                             StartPoint="0.5,0">
                           <GradientStop Color="#FFCA4800"
                                         Offset="1" />
                           <GradientStop Color="#FFFF9B09" />
                        </LinearGradientBrush>
                     </Border.Background>
                  </Border>
                  <Border BorderBrush="#66000000"
                          BorderThickness="1"
                          CornerRadius="6"
                          Grid.RowSpan="3" />
                  <Border BorderBrush="#33FFFFFF"
                          BorderThickness="1"
                          CornerRadius="5"
                          Margin="1"
                          Grid.RowSpan="3" />
                  <Border Opacity="0.08"
                          CornerRadius="6"
                          Grid.RowSpan="3">
                     <Border.Background>
                        <LinearGradientBrush StartPoint="-0.015,0.1"
                                             EndPoint="9.187,9.236"
                                             SpreadMethod="Repeat"
                                             MappingMode="Absolute">
                           <GradientStop Offset="0"
                                         Color="Transparent" />
                           <GradientStop Color="Transparent"
                                         Offset="0.5" />
                           <GradientStop Offset="0.5"
                                         Color="White" />
                           <GradientStop Offset="1"
                                         Color="White" />
                        </LinearGradientBrush>
                     </Border.Background>
                  </Border>
                  <Border Background="#66000000"
                          Grid.Row="1"
                          Margin="10,0" />
                  <TextBlock HorizontalAlignment="Left"
                             Margin="10,6,0,0"
                             TextWrapping="Wrap"
                             Text="Invalid License / Trial Expired"
                             VerticalAlignment="Bottom"
                             Foreground="White"
                             FontSize="16" />
                  <RichTextBox Style="{StaticResource MetroDarkThemeLicensingStateRichTextBoxStyle}"
                               Margin="10,6,0,10"
                               Grid.Row="2">
                     <Paragraph>
                        <Run>A valid license key must be provided in order to license Xceed Ultimate ListBox for Silverlight. Refer to the</Run>
                        <Hyperlink NavigateUri="http://doc.xceedsoft.com/products/XceedSilverlightListBox/Licensing.html"
                                   TargetName="_blank"
                                   Foreground="White"
                                   MouseOverForeground="#550000">Licensing topic</Hyperlink>
                        <Run>in the documentation for more information.</Run>
                     </Paragraph>
                  </RichTextBox>
               </Grid>
            </Grid>

            <Grid x:Name="DataNavPane"
                  Visibility="Collapsed"
                  Grid.Row="1"
                  Grid.RowSpan="2">

               <Grid.RowDefinitions>
                  <RowDefinition Height="48" />
                  <RowDefinition />
               </Grid.RowDefinitions>
               <Border BorderBrush="Transparent"
                       Background="Black"
                       BorderThickness="0"
                       Grid.RowSpan="2" />

               <Border BorderBrush="Transparent"
                       Background="{StaticResource MetroAccentColorBrush}"
                       BorderThickness="0"
                       Grid.Row="0" />

               <Button x:Name="HidePaneButton"
                       Grid.Row="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Padding="5"
                       Margin="5"
                       Height="35"
                       Width="35"
                       Style="{StaticResource MetroDarkThemeButtonStyle}"
                       local:MetroThemeHelper.MetroIconTemplate="{StaticResource MetroDarkThemeCloseIconTemplate}"
                       local:MetroThemeHelper.MetroMouseOverIconTemplate="{StaticResource MetroDarkThemeCloseMouseOverIconTemplate}"
                       Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HideDataNavigationPaneCommand}" />

               <sllb:DataNavigationControl x:Name="DataNavControl"
                                           DataNavigationHost="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                           Grid.Row="1" />
            </Grid>
         </Grid>
      </Border>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: ListBoxItem
    ************************** -->
   <ControlTemplate x:Key="MetroDarkThemeListBoxItemTemplate"
                    TargetType="sllb:ListBoxItem">
      <Border Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />
               <VisualState x:Name="MouseOver">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="mouseOverBorder"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="00:00:00.000" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To=".55" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>
            <VisualStateGroup x:Name="SelectionStates">
               <VisualState x:Name="Unselected" />
               <VisualState x:Name="Selected">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="selectedBorder"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="00:00:00.000" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>
            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Focused"/>                 

               <VisualState x:Name="Unfocused" />
            </VisualStateGroup>
            <VisualStateGroup x:Name="LoadingStates">
               <VisualState x:Name="Loaded">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="00:00:00.250"
                                      To="1" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Loading">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To="0" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

         </VisualStateManager.VisualStateGroups>

         <Grid>
            <Border x:Name="mouseOverBorder"
                    BorderBrush="Transparent"
                    BorderThickness="0"
                    Background="#FF262626"
                    Opacity="0" />

            <Border x:Name="selectedBorder"
                    BorderBrush="Transparent"
                    BorderThickness="0"
                    Background="#FF353535"
                    Opacity="0" />

            <ContentControl x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            HorizontalContentAlignment="Stretch"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            VerticalContentAlignment="Stretch"
                            Margin="{TemplateBinding Padding}"
                            Foreground="{TemplateBinding Foreground}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}" />

            <Rectangle x:Name="FocusVisualElement"
                       Stroke="#FF828183"
                       StrokeThickness="1"
                       Visibility="Collapsed" />
         </Grid>
      </Border>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: ListBoxGroupHeader
    ************************** -->
   <ControlTemplate x:Key="MetroDarkThemeListBoxGroupHeaderTemplate"
                    TargetType="sllb:ListBoxGroupHeader">
      <Grid>
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To=".55" />

                     <DoubleAnimation Storyboard.TargetName="HorizontalContentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To=".55" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Normal" />
               <VisualState x:Name="MouseOver" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Unfocused" />
               <VisualState x:Name="Focused" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="SelectionStates">
               <VisualState x:Name="Unselected" />
               <VisualState x:Name="SelectedUnfocused" />
               <VisualState x:Name="Selected" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="LayoutModeStates">
               <VisualState x:Name="Vertical" />
               <VisualState x:Name="Horizontal">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalLayoutGrid"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalLayoutGrid"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Collapsed</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Floating">

               </VisualState>
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>

         <Border x:Name="rootBorder"
                 BorderBrush="{TemplateBinding BorderBrush}"
                 BorderThickness="{TemplateBinding BorderThickness}"
                 Background="{TemplateBinding Background}">

            <Grid>
               <Grid x:Name="VerticalLayoutGrid"
                     Visibility="Visible">
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="*" />
                     <ColumnDefinition Width="Auto" />
                  </Grid.ColumnDefinitions>

                  <sllb:HierarchicalGroupValueControl x:Name="contentPresenter"
                                                      Margin="{TemplateBinding Padding}"
                                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                      VerticalAlignment="Bottom"
                                                      GroupValueDataTemplates="{TemplateBinding GroupValueDataTemplates}"
                                                      ItemsSource="{Binding Path=FieldNameValuePairs}"
                                                      sllb:ListBoxContainer.LayoutMode="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:ListBoxContainer.LayoutMode)}">
                     <sllb:HierarchicalGroupValueControl.ItemsPanel>
                        <ItemsPanelTemplate>
                           <StackPanel Orientation="Horizontal"></StackPanel>
                        </ItemsPanelTemplate>
                     </sllb:HierarchicalGroupValueControl.ItemsPanel>
                  </sllb:HierarchicalGroupValueControl>

                  <StackPanel Grid.Column="1" 
                              Orientation="Horizontal"
                              HorizontalAlignment="Right"
                              Margin="0,0,5,0">

                     <Button Style="{StaticResource MetroDarkThemeButtonStyle}"
                             IsTabStop="False"
                             Margin="5"
                             Padding="5"
                             Height="35"
                             Width="35"
                             local:MetroThemeHelper.MetroIconTemplate="{StaticResource MetroDarkThemeDataNavigationIconTemplate}"
                             local:MetroThemeHelper.MetroMouseOverIconTemplate="{StaticResource MetroDarkThemeDataNavigationMouseOverIconTemplate}"
                             Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ParentListBox.ShowDataNavigationPaneCommand}">
                        <Button.Content>
                           <Grid Margin="12,6,0,6"
                                 Width="5"
                                 Height="5">
                              <Rectangle Fill="{StaticResource MetroAccentColorBrush}" />
                              <Rectangle Fill="#80FFFFFF" />
                           </Grid>
                        </Button.Content>
                     </Button>

                     <Button x:Name="PreviousButton"
                             Style="{StaticResource MetroDarkThemeButtonStyle}"
                             IsTabStop="False"
                             Margin="5,5,2,5"
                             Padding="-1,0,1,0"
                             Height="35"
                             Width="35"
                             local:MetroThemeHelper.MetroIconTemplate="{StaticResource MetroDarkThemeUpArrowIconTemplate}"
                             local:MetroThemeHelper.MetroMouseOverIconTemplate="{StaticResource MetroDarkThemeUpArrowMouseOverIconTemplate}"
                             Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NavigateToPreviousGroupCommand}" />

                     <Button x:Name="NextButton"
                             Style="{StaticResource MetroDarkThemeButtonStyle}"
                             IsTabStop="False"
                             Margin="2,5,5,5"
                             Padding="-1,0,1,0"
                             Height="35"
                             Width="35"
                             local:MetroThemeHelper.MetroIconTemplate="{StaticResource MetroDarkThemeDownArrowIconTemplate}"
                             local:MetroThemeHelper.MetroMouseOverIconTemplate="{StaticResource MetroDarkThemeDownArrowMouseOverIconTemplate}"
                             Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NavigateToNextGroupCommand}" />
                  </StackPanel>

               </Grid>

               <Grid x:Name="HorizontalLayoutGrid"
                     Visibility="Collapsed">
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="*" />
                     <ColumnDefinition Width="40" />
                     <ColumnDefinition Width="*" />
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                     <RowDefinition Height="*" />
                     <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>

                  <Button x:Name="HorizontalPreviousButton"
                          Grid.Row="1"
                          Grid.Column="0"
                          Style="{StaticResource MetroDarkThemeButtonStyle}"
                          IsTabStop="False"
                          Margin="5"
                          Height="35"
                          Width="35"
                          local:MetroThemeHelper.MetroIconTemplate="{StaticResource MetroDarkThemeLeftArrowIconTemplate}"
                          local:MetroThemeHelper.MetroMouseOverIconTemplate="{StaticResource MetroDarkThemeLeftArrowMouseOverIconTemplate}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NavigateToPreviousGroupCommand}" />

                  <Button x:Name="HorizontalNextButton"
                          Grid.Row="1"
                          Grid.Column="2"
                          Style="{StaticResource MetroDarkThemeButtonStyle}"
                          IsTabStop="False"
                          Margin="5"
                          Height="35"
                          Width="35"
                          local:MetroThemeHelper.MetroIconTemplate="{StaticResource MetroDarkThemeRightArrowIconTemplate}"
                          local:MetroThemeHelper.MetroMouseOverIconTemplate="{StaticResource MetroDarkThemeRightArrowMouseOverIconTemplate}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NavigateToNextGroupCommand}" />

                  <Button Style="{StaticResource MetroDarkThemeButtonStyle}"
                          Grid.Row="1"
                          Grid.Column="1"
                          IsTabStop="False"
                          Padding="5"
                          Height="35"
                          Width="35"
                          local:MetroThemeHelper.MetroIconTemplate="{StaticResource MetroDarkThemeDataNavigationIconTemplate}"
                          local:MetroThemeHelper.MetroMouseOverIconTemplate="{StaticResource MetroDarkThemeDataNavigationMouseOverIconTemplate}"
                          Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ParentListBox.ShowDataNavigationPaneCommand}">
                     <Button.Content>
                        <Grid Margin="12,6,0,6"
                              Width="5"
                              Height="5">
                           <Rectangle Fill="{StaticResource MetroAccentColorBrush}" />
                           <Rectangle Fill="#80FFFFFF" />
                        </Grid>
                     </Button.Content>
                  </Button>

                  <sllb:HierarchicalGroupValueControl x:Name="HorizontalContentPresenter"
                                                      Grid.Row="0"
                                                      Grid.Column="0"
                                                      Grid.ColumnSpan="3"
                                                      Margin="{TemplateBinding Padding}"
                                                      HorizontalAlignment="Left"
                                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                      GroupValueDataTemplates="{TemplateBinding GroupValueDataTemplates}"
                                                      ItemsSource="{Binding Path=FieldNameValuePairs}"
                                                      sllb:ListBoxContainer.LayoutMode="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:ListBoxContainer.LayoutMode)}">
                     <sllb:HierarchicalGroupValueControl.ItemsPanel>
                        <ItemsPanelTemplate>
                           <StackPanel Orientation="Vertical"></StackPanel>
                        </ItemsPanelTemplate>
                     </sllb:HierarchicalGroupValueControl.ItemsPanel>
                  </sllb:HierarchicalGroupValueControl>
               </Grid>
            </Grid>
         </Border>
      </Grid>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: HierarchicalGroupValueItem
    ************************** -->
   <ControlTemplate x:Key="MetroDarkThemeHierarchicalGroupValueItemTemplate"
                    TargetType="sllb:HierarchicalGroupValueItem">
      <Grid>
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="GroupValueLevelStates">
               <VisualState x:Name="None" />

               <VisualState x:Name="Root" />

               <VisualState x:Name="Leaf">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="leafStateGridLayout"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Collapsed</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>

               <VisualState x:Name="RootAndLeaf">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="leafStateGridLayout"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Collapsed</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>

         <Border x:Name="rootBorder"
                 Margin="5,0">
            <Grid>
               <Grid.ColumnDefinitions>
                  <ColumnDefinition />
                  <ColumnDefinition />
               </Grid.ColumnDefinitions>

               <ContentPresenter Grid.Column="0"
                                 Content="{TemplateBinding DataContext}"
                                 ContentTemplate="{TemplateBinding ContentTemplate}" />

               <Grid x:Name="leafStateGridLayout"
                     Grid.Column="1"
                     Margin="10,0,0,0">
                  <Grid x:Name="separatorLayoutGrid"
                        Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ParentHierarchicalGroupValueControl.SeparatorVisibility}">
                     <Ellipse Fill="White"
                              Stroke="White"
                              StrokeThickness="5"
                              Width="8"
                              Height="8"
                              VerticalAlignment="Bottom"
                              Margin="0,0,0,10" />
                  </Grid>
               </Grid>
            </Grid>
         </Border>
      </Grid>

   </ControlTemplate>

   <!--**************************
    * TEMPLATE: SearchTextBox
    ************************** -->
   <Style x:Key="MetroDarkThemeClearFilterControlButtonStyle"
          TargetType="Button">

      <Setter Property="Cursor"
              Value="Hand" />

      <Setter Property="Padding"
              Value="5" />

      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="Button">
               <Grid x:Name="grid"
                     Background="Transparent">

                  <ContentPresenter x:Name="contentPresenter"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    Content="{TemplateBinding Content}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Margin="{TemplateBinding Padding}" />
               </Grid>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <ControlTemplate x:Key="MetroDarkThemeSearchTextBoxTemplate"
                    TargetType="sllb:SearchTextBox">
      <Grid x:Name="RootElement">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />

               <VisualState x:Name="MouseOver" />

               <VisualState x:Name="ReadOnly" />

               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="RootElement"
                                      Storyboard.TargetProperty="Opacity"
                                      To="0.5"
                                      Duration="00:00:00.000" />

                     <DoubleAnimation Storyboard.TargetName="disabledBorder"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="00:00:00.000" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="WatermarkStates">
               <VisualState x:Name="WatermarkVisible">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="WatermarkPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      To="0.5"
                                      Duration="00:00:00.000" />
                  </Storyboard>
               </VisualState>

               <VisualState x:Name="WatermarkHidden">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="WatermarkPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      To="0"
                                      Duration="00:00:00.000" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="FilterStates">
               <VisualState x:Name="NoFilter" />

               <VisualState x:Name="HasFilter">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="searchIconPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      To="0"
                                      Duration="00:00:00.000" />

                     <ObjectAnimationUsingKeyFrames Duration="0"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Storyboard.TargetName="ClearFilterButton">
                        <DiscreteObjectKeyFrame KeyTime="0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>

               <!-- Filter is too complex or too large to be displayed, only display filterTooComplexTextBlock-->
               <VisualState x:Name="TooComplex">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Duration="0"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Storyboard.TargetName="ContentElement">
                        <DiscreteObjectKeyFrame KeyTime="0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Collapsed</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>

                     <ObjectAnimationUsingKeyFrames Duration="0"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Storyboard.TargetName="WatermarkPresenter">
                        <DiscreteObjectKeyFrame KeyTime="0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Collapsed</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>

                     <ObjectAnimationUsingKeyFrames Duration="0"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Storyboard.TargetName="FilterTooComplexTextBlock">
                        <DiscreteObjectKeyFrame KeyTime="0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>

                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Unfocused" />
               <VisualState x:Name="Focused">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="hasFocusBorder"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="00:00:00.000" />

                     <DoubleAnimation Storyboard.TargetName="searchIcon"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="00:00:00.000" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>


         </VisualStateManager.VisualStateGroups>

         <Border x:Name="border"
                 Grid.ColumnSpan="2"
                 Background="#BFBFBF" />

         <Border x:Name="hasFocusBorder"
                 Grid.ColumnSpan="2"
                 Background="White"
                 BorderThickness="0"
                 BorderBrush="Transparent"
                 Opacity="0" />

         <Border x:Name="disabledBorder"
                 Grid.ColumnSpan="2"
                 Background="Black"
                 BorderThickness="3"
                 BorderBrush="White"
                 Opacity="0" />

         <Grid Margin="8,0,0,0"
               VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="*" />
               <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <ScrollViewer x:Name="ContentElement"
                          Padding="{TemplateBinding Padding}"
                          BorderThickness="0"
                          IsTabStop="False" />

            <ContentPresenter x:Name="WatermarkPresenter"
                              IsHitTestVisible="False"
                              Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=WatermarkContent, Mode=OneWay}"
                              ContentTemplate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=WatermarkContentTemplate, Mode=OneWay}" />

            <TextBlock x:Name="FilterTooComplexTextBlock"
                       Text="{TemplateBinding TooComplexText}"
                       Visibility="Collapsed" />
            <ContentPresenter x:Name="searchIconPresenter"
                              Margin="0,0,6,0"
                              HorizontalAlignment="Center"
                              VerticalAlignment="Center"
                              Grid.Column="1"
                              IsHitTestVisible="False">
               <Path x:Name="searchIcon"
                     Height="15.482994079589844"
                     Width="15.4462890625"
                     Stretch="Fill"
                     Opacity="0.5"
                     Data="M 13.68194580078125,10.379951477050781 C16.034423828125,8.005409240722656 16.034423828125,4.1550140380859375 13.68194580078125,1.7809066772460938 11.3294677734375,-0.5936355590820312 7.51531982421875,-0.5936355590820312 5.163330078125,1.7809066772460938 3.22637939453125,3.7360000610351562 2.8876953125,6.690315246582031 4.1407470703125,8.999420166015625 4.1407470703125,8.999420166015625 0.194580078125,13.024307250976562 0.194580078125,13.024307250976562 -0.185791015625,13.408218383789062 0.00872802734375,14.225440979003906 0.6273193359375,14.85028076171875 1.245849609375,15.4742431640625 2.05596923828125,15.67010498046875 2.43585205078125,15.287055969238281 2.43585205078125,15.287055969238281 6.34381103515625,11.300300598144531 6.34381103515625,11.300300598144531 8.65679931640625,12.691230773925781 11.69183349609375,12.388778686523438 13.68194580078125,10.379951477050781 zM 7.2255859375,8.297897338867188 C6.01239013671875,7.0733642578125 6.0128173828125,5.087066650390625 7.22601318359375,3.8629684448242188 8.438720703125,2.638427734375 10.406494140625,2.638427734375 11.61968994140625,3.8629684448242188 12.83197021484375,5.086631774902344 12.83282470703125,7.07379150390625 11.61968994140625,8.298332214355469 10.40740966796875,9.522430419921875 8.4378662109375,9.522003173828125 7.2255859375,8.297897338867188 z"
                     Fill="Black" />
            </ContentPresenter>


            <Button x:Name="ClearFilterButton"
                    Visibility="Collapsed"
                    Grid.Column="1"
                    IsTabStop="False"
                    Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ClearFilterCommand}"
                    Style="{StaticResource MetroDarkThemeClearFilterControlButtonStyle}">
               <Path Height="8.485282897949219"
                     Width="8.4853515625"
                     Stretch="Fill"
                     Opacity="1"
                     Data="M 691.828369140625,108.75736236572266 C691.828369140625,108.75736236572266 689,111.58578491210938 689,111.58578491210938 689,111.58578491210938 686.171630859375,108.75736236572266 686.171630859375,108.75736236572266 686.171630859375,108.75736236572266 684.75732421875,110.17156982421875 684.75732421875,110.17156982421875 684.75732421875,110.17156982421875 687.5858154296875,113 687.5858154296875,113 687.5858154296875,113 684.75732421875,115.82843017578125 684.75732421875,115.82843017578125 684.75732421875,115.82843017578125 686.171630859375,117.24264526367188 686.171630859375,117.24264526367188 686.171630859375,117.24264526367188 689,114.41421508789062 689,114.41421508789062 689,114.41421508789062 691.828369140625,117.24264526367188 691.828369140625,117.24264526367188 691.828369140625,117.24264526367188 693.24267578125,115.82843017578125 693.24267578125,115.82843017578125 693.24267578125,115.82843017578125 690.4141845703125,113 690.4141845703125,113 690.4141845703125,113 693.24267578125,110.17156982421875 693.24267578125,110.17156982421875 693.24267578125,110.17156982421875 691.828369140625,108.75736236572266 691.828369140625,108.75736236572266 z"
                     Fill="Black"
                     HorizontalAlignment="Center"
                     VerticalAlignment="Center"
                     UseLayoutRounding="False"
                     Grid.Column="1"
                     Margin="0,0,3,0" />
            </Button>
         </Grid>

      </Grid>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: FilterControl
    ************************** -->
   <ControlTemplate x:Key="MetroDarkThemeFilterControlTemplate"
                    TargetType="sllb:FilterControl">
      <Grid>
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />
               <VisualState x:Name="Disabled" />
               <VisualState x:Name="MouseOver" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Unfocused" />
               <VisualState x:Name="Focused" />
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>

         <sllb:SearchTextBox x:Name="searchTextBox"
                             FilterExpression="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=UIFilterExpression, Mode=TwoWay}"
                             FilteredFieldNames="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:SearchTextBox.FilteredFieldNames)}" 
                             TooComplexText="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:SearchTextBox.TooComplexText)}"/>
      </Grid>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: DataNavigationControl
    ************************** -->
   <ControlTemplate x:Key="MetroDarkThemeDataNavigationControlTemplate"
                    TargetType="sllb:DataNavigationControl">

      <Border Margin="{TemplateBinding Padding}"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}">

         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />
               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="DataPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To=".55" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="MouseOver" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Unfocused" />
               <VisualState x:Name="Focused" />
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>
         <Grid>
            <ItemsPresenter x:Name="DataPresenter"
                            Margin="2" />
         </Grid>
      </Border>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: DataNavigationItem
    ************************** -->
   <ControlTemplate x:Key="MetroDarkThemeDataNavigationItemTemplate"
                    TargetType="sllb:DataNavigationItem">
      <Grid x:Name="grid">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="00:00:00.200" />

                  <VisualTransition From="MouseOver"
                                    To="Pressed" />
               </VisualStateGroup.Transitions>

               <VisualState x:Name="Normal" />

               <VisualState x:Name="MouseOver">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="mouseOver"
                                      Storyboard.TargetProperty="(UIElement.Opacity)"
                                      Duration="00:00:00.000"
                                      To="1" />

                     <ColorAnimation Storyboard.TargetName="contentPresenter"
                                     Storyboard.TargetProperty="(ContentControl.Foreground).(SolidColorBrush.Color)"
                                     Duration="00:00:00.000"
                                     To="#212021" />
                  </Storyboard>
               </VisualState>

               <VisualState x:Name="Pressed">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="pressed"
                                      Storyboard.TargetProperty="(UIElement.Opacity)"
                                      Duration="00:00:00.000"
                                      To="1" />

                     <ColorAnimation Storyboard.TargetName="contentPresenter"
                                     Storyboard.TargetProperty="(ContentControl.Foreground).(SolidColorBrush.Color)"
                                     Duration="00:00:00.000"
                                     To="White" />
                  </Storyboard>
               </VisualState>

               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="grid"
                                      Storyboard.TargetProperty="(UIElement.Opacity)"
                                      Duration="00:00:00.000"
                                      To="0.5" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Focused" />

               <VisualState x:Name="Unfocused" />
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>

         <Border x:Name="background"
                 BorderThickness="{TemplateBinding BorderThickness}"
                 BorderBrush="{TemplateBinding BorderBrush}"
                 Background="{TemplateBinding Background}" />

         <Border x:Name="mouseOver"
                 Opacity="0"
                 BorderThickness="0"
                 Background="#7B797B" />

         <Border x:Name="pressed"
                 Opacity="0"
                 BorderThickness="0"
                 Background="{StaticResource MetroAccentColorBrush}" />

         <ContentControl x:Name="contentPresenter"
                         HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                         VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                         Foreground="{TemplateBinding Foreground}"
                         FontFamily="{TemplateBinding FontFamily}"
                         FontSize="{TemplateBinding FontSize}"
                         Content="{Binding}"
                         ContentTemplate="{TemplateBinding ContentTemplate}"
                         Margin="{TemplateBinding Padding}" />
      </Grid>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: LoadingIndicator
    ************************** -->
   <ControlTemplate x:Key="MetroDarkThemeLoadingIndicatorTemplate"
                    TargetType="sllb:LoadingIndicator">
      <Border x:Name="loadingGlyphBackground"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              Opacity="0">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="RequestStates">

               <VisualState x:Name="NoPendingRequests" />

               <VisualState x:Name="RequestsPending">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="loadingGlyphBackground"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="00:00:00.350" />
                     <DoubleAnimation Storyboard.TargetName="loadingGlyph"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="00:00:00.350" />
                  </Storyboard>
               </VisualState>

               <VisualStateGroup.Transitions>
                  <VisualTransition From="RequestsPending"
                                    To="NoPendingRequests">
                     <Storyboard>
                        <DoubleAnimation Storyboard.TargetName="loadingGlyphBackground"
                                         Storyboard.TargetProperty="Opacity"
                                         BeginTime="00:00:0.5"
                                         To="0"
                                         Duration="00:00:00.350" />
                        <DoubleAnimation Storyboard.TargetName="loadingGlyph"
                                         Storyboard.TargetProperty="Opacity"
                                         BeginTime="00:00:0.5"
                                         To="0"
                                         Duration="00:00:00.350" />
                     </Storyboard>
                  </VisualTransition>
               </VisualStateGroup.Transitions>
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>

         <sllb:LoadingSpinner x:Name="loadingGlyph"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Opacity="0"
                              Value="{TemplateBinding AnimatedValue}" />
      </Border>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: LoadingSpinner
    ************************** -->
   <ControlTemplate x:Key="MetroDarkThemeLoadingSpinnerTemplate"
                    TargetType="sllb:LoadingSpinner">
      <Border Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              Width="40"
              Height="40">
         <Grid>
            <Grid.Resources>
               <sllb:RatioToOpacityConverter x:Key="MetroDarkThemeRatioToOpacityConverter" />
            </Grid.Resources>

            <!-- Shadows -->
            <Border x:Name="14_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="336" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="13_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="312" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="12_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="288" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="11_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="264" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="10_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="240" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="09_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="216" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="08_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="192" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="07_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="168" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="06_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="144" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="05_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="120" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="04_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="96" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="03_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="72" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="02_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="48" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="01_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="24" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="00_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    Height="8"
                    VerticalAlignment="Top" />

            <!-- Highlights -->
            <Border x:Name="14"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=336}">
               <Border.RenderTransform>
                  <RotateTransform Angle="336" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="13"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=312}">
               <Border.RenderTransform>
                  <RotateTransform Angle="312" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="12"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=288}">
               <Border.RenderTransform>
                  <RotateTransform Angle="288" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="11"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=264}">
               <Border.RenderTransform>
                  <RotateTransform Angle="264" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="10"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=240}">
               <Border.RenderTransform>
                  <RotateTransform Angle="240" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="09"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=216}">
               <Border.RenderTransform>
                  <RotateTransform Angle="216" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="08"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=192}">
               <Border.RenderTransform>
                  <RotateTransform Angle="192" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="07"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=168}">
               <Border.RenderTransform>
                  <RotateTransform Angle="168" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="06"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=144}">
               <Border.RenderTransform>
                  <RotateTransform Angle="144" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="05"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=120}">
               <Border.RenderTransform>
                  <RotateTransform Angle="120" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="04"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=96}">
               <Border.RenderTransform>
                  <RotateTransform Angle="96" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="03"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=72}">
               <Border.RenderTransform>
                  <RotateTransform Angle="72" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="02"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=48}">
               <Border.RenderTransform>
                  <RotateTransform Angle="48" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="01"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=24}">
               <Border.RenderTransform>
                  <RotateTransform Angle="24" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="00"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource MetroDarkThemeRatioToOpacityConverter}, ConverterParameter=0}" />
         </Grid>
      </Border>
   </ControlTemplate>

   <!--**************************
    * STYLE: LoadingIndicator
    ************************** -->
   <Style x:Key="MetroDarkThemeLoadingIndicatorStyle"
          TargetType="sllb:LoadingIndicator">
      <Setter Property="FadeOutAnimationDuration"
              Value="850" />
      <Setter Property="AnimationDuration"
              Value="1000" />
      <Setter Property="IsHitTestVisible"
              Value="False" />
      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeLoadingIndicatorTemplate}" />
   </Style>

   <!--**************************
    * STYLE: LoadingSpinner
    ************************** -->
   <Style x:Key="MetroDarkThemeLoadingSpinnerStyle"
          TargetType="sllb:LoadingSpinner">
      <Setter Property="HighlightBrush"
              Value="{StaticResource MetroAccentColorBrush}" />
      <Setter Property="ShadowBrush"
              Value="{StaticResource MetroDarkThemeLoadingSpinnerShadowBackgroundBrush}" />
      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeLoadingSpinnerTemplate}" />
   </Style>

   <!--**************************
    * STYLE: ListBox
    ************************** -->
   <Style x:Key="MetroDarkThemeListBoxStyle"
          TargetType="sllb:ListBox">

      <Setter Property="BorderThickness"
              Value="0" />

      <Setter Property="BorderBrush"
              Value="Transparent" />

      <Setter Property="Background"
              Value="Black" />

      <Setter Property="Foreground"
              Value="White" />

      <Setter Property="Padding"
              Value="1" />

      <Setter Property="IsTabStop"
              Value="False" />

      <Setter Property="FontFamily"
              Value="Segoe UI, Tahoma, Verdana" />

      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeListBoxTemplate}" />
   </Style>

   <!--**************************
    * STYLE: ListBoxItem
    ************************** -->
   <Style x:Key="MetroDarkThemeListBoxItemStyle"
          TargetType="sllb:ListBoxItem">

      <Setter Property="Padding"
              Value="3" />

      <Setter Property="MinHeight"
              Value="24" />

      <Setter Property="HorizontalContentAlignment"
              Value="Stretch" />

      <Setter Property="VerticalContentAlignment"
              Value="Stretch" />

      <Setter Property="Foreground"
              Value="White" />

      <Setter Property="FontFamily"
              Value="Segoe UI, Tahoma, Verdana" />

      <Setter Property="FontSize"
              Value="14" />

      <Setter Property="Background"
              Value="Transparent" />

      <Setter Property="BorderThickness"
              Value="0" />

      <Setter Property="BorderBrush"
              Value="Transparent" />

      <Setter Property="TabNavigation"
              Value="Local" />

      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeListBoxItemTemplate}" />
   </Style>

   <!--**************************
    * STYLE: ListBoxGroupHeader
    ************************** -->
   <Style x:Key="MetroDarkThemeListBoxGroupHeaderStyle"
          TargetType="sllb:ListBoxGroupHeader">
      <Setter Property="Background"
              Value="{StaticResource MetroAccentColorBrush}" />

      <Setter Property="BorderThickness"
              Value="0" />

      <Setter Property="BorderBrush"
              Value="Transparent" />

      <Setter Property="Foreground"
              Value="White" />

      <Setter Property="FontSize"
              Value="24" />

      <Setter Property="FontFamily"
              Value="Segoe UI, Tahoma, Verdana" />

      <Setter Property="Padding"
              Value="0,15,0,1" />

      <Setter Property="MinHeight"
              Value="48" />

      <Setter Property="VerticalContentAlignment"
              Value="Top" />

      <Setter Property="HorizontalContentAlignment"
              Value="Left" />

      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeListBoxGroupHeaderTemplate}" />
   </Style>

   <!--**************************
    * STYLE: HierarchicalGroupPersenterItem
    ************************** -->
   <Style x:Key="MetroDarkThemeHierarchicalGroupValueItem"
          TargetType="sllb:HierarchicalGroupValueItem">

      <Setter Property="IsTabStop"
              Value="False" />

      <Setter Property="HorizontalContentAlignment"
              Value="Left" />

      <Setter Property="VerticalContentAlignment"
              Value="Bottom" />

      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeHierarchicalGroupValueItemTemplate}" />

   </Style>

   <!--**************************
    * STYLE: SearchTextBox
    ************************** -->
   <Style x:Key="MetroDarkThemeSearchTextBoxStyle" 
          TargetType="sllb:SearchTextBox">

      <Setter Property="FontFamily"
              Value="Segoe UI, Tahoma, Verdana" />

      <Setter Property="FontStyle"
              Value="Normal" />

      <Setter Property="FontSize"
              Value="14" />

      <Setter Property="Foreground"
              Value="Black" />

      <Setter Property="Padding"
              Value="0" />

      <Setter Property="WatermarkContent"
              Value="Search" />

      <Setter Property="SelectionBackground"
              Value="{StaticResource MetroAccentColorBrush}" />

      <Setter Property="SelectionForeground"
              Value="White" />

      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeSearchTextBoxTemplate}" />
   </Style>

   <!--**************************
    * STYLE: FilterControl
    ************************** -->
   <Style x:Key="MetroDarkThemeFilterControlStyle" 
          TargetType="sllb:FilterControl">
      <Setter Property="MinHeight"
              Value="26" />

      <Setter Property="ClearFilterButtonVisibility"
              Value="Collapsed" />

      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeFilterControlTemplate}" />
   </Style>

   <!--**************************
    * Style: DataNavigationControl
    ************************** -->
   <Style x:Key="MetroDarkThemeDataNavigationControlStyle" 
          TargetType="sllb:DataNavigationControl">
      <Setter Property="Background"
              Value="Black" />

      <Setter Property="BorderBrush"
              Value="Transparent" />

      <Setter Property="BorderThickness"
              Value="0" />

      <Setter Property="ItemsPanel">
         <Setter.Value>
            <ItemsPanelTemplate>
               <sllb:UniformGrid x:Name="KeysHost"
                                 Orientation="Horizontal"
                                 Columns="5"
                                 Rows="{Binding RelativeSource={RelativeSource Self}, Path=Children.Count, Converter={StaticResource MetroDarkThemeDividendDivisorToCeilingQuotientConverter}, ConverterParameter=5}"  />
            </ItemsPanelTemplate>
         </Setter.Value>
      </Setter>

      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeDataNavigationControlTemplate}" />
   </Style>

   <!--**************************
    * STYLE: DataNavigationItem
    ************************** -->
   <Style x:Key="MetroDarkThemeDataNavigationItemStyle" 
          TargetType="sllb:DataNavigationItem">

      <Setter Property="IsTabStop"
              Value="False" />

      <Setter Property="HorizontalContentAlignment"
              Value="Left" />

      <Setter Property="VerticalContentAlignment"
              Value="Bottom" />

      <Setter Property="Padding"
              Value="5,0,0,0" />

      <Setter Property="Background"
              Value="{StaticResource MetroDarkThemeGroupNavigationControlButtonDefaultBackgroundBrush}" />

      <Setter Property="BorderBrush"
              Value="Transparent" />

      <Setter Property="BorderThickness"
              Value="0" />

      <Setter Property="Margin"
              Value="4" />

      <Setter Property="Foreground"
              Value="#7B797B" />

      <Setter Property="FontSize"
              Value="28" />

      <Setter Property="FontFamily"
              Value="Segoe UI, Tahoma, Verdana" />

      <Setter Property="Template"
              Value="{StaticResource MetroDarkThemeDataNavigationItemTemplate}" />
   </Style>

</local:MetroStylesBase>

